package com.android.functionmanagement.receiver;

import com.android.functionmanagement.ui.SosActivity;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class SosReceiver extends BroadcastReceiver {
	public SosReceiver() {
	}

	@Override
	public void onReceive(Context context, Intent intent) {
		// TODO: This method is called when the BroadcastReceiver is receiving
		// an Intent broadcast.
		if(intent == null)
			return ;
		if("android.intent.action.uwatch.FIRST_AID".equals(intent.getAction())){
			Intent in = new Intent(context, SosActivity.class);
			in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
			context.startActivity(in);
		}
	}
}
